package com.shwread.httpsdk.http.callback;

public abstract class BaseAction
        implements
        ActionListener
{
	private static final String TAG = BaseAction.class.getSimpleName();
	@Override
	public abstract void OK(Object obj);
	
	@Override
	public void ERROR(int resultCode, String message) {
		System.out.println(TAG+"<ERROR>,resultCode:"+resultCode+",message:"+message);
		onError();
	}
	
	@Override
	public void HTTPERROR(int statusCode) {
		System.out.println(TAG+"<HTTPERROR>,statusCode:"+statusCode);
		onError();
	}
	
	protected void onError(){ }
	
}
